package com.etonedu.meals.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class AttenRuleBean implements Parcelable {
    private int ruleType;
    private List<TimeList> timeList;

    public int getRuleType() {
        return ruleType;
    }

    public void setRuleType(int ruleType) {
        this.ruleType = ruleType;
    }

    public List<TimeList> getTimeList() {
        return timeList;
    }

    public void setTimeList(List<TimeList> timeList) {
        this.timeList = timeList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.ruleType);
        dest.writeTypedList(this.timeList);
    }

    public AttenRuleBean() {
    }

    protected AttenRuleBean(Parcel in) {
        this.ruleType = in.readInt();
        this.timeList = in.createTypedArrayList(TimeList.CREATOR);
    }

    public static final Creator<AttenRuleBean> CREATOR = new Creator<AttenRuleBean>() {
        @Override
        public AttenRuleBean createFromParcel(Parcel source) {
            return new AttenRuleBean(source);
        }

        @Override
        public AttenRuleBean[] newArray(int size) {
            return new AttenRuleBean[size];
        }
    };
}
